<?php

namespace app\index\controller;

use think\Controller;
use think\Log;

class Index extends Base
{
    public function index()
    {
        //显示推荐位信息
        $feature1 = model('featured')->where(['type' => 0, 'status' => 1])->select();
        $feature2 = model('featured')->where(['type' => 1, 'status' => 1])->select();
        Log::write($feature1, 'log');
        //商品分类数据 美食
        $deals = model('deal')->getNormalDealByCategoryCityId(1, $this->city->id);
        //获取显示分类信息
        $categorys = model('category')->getNormalRecommendCategoryByParentId(1, 4);
        return $this->fetch('index/index', ['feature1' => $feature1, 'feature2' => $feature2, 'deals' => $deals, 'cates' => $categorys]);
    }
}
